<template>
	<div>
		
		<!--   放的是子路由  index.vue  二级页面  home publish  my -->
		<!-- keep-alive vue 内置组件  -->
		<keep-alive :include="['Home']">
			<router-view></router-view>
		</keep-alive>
			
		
		
		<!--  底部栏放这 -->
	<van-tabbar v-model="active" 
	:active-color="baseColor" 
	inactive-color="#333"  
	 route
	 > 
	    <van-tabbar-item replace :key="item.path" :to="item.path" v-for="item in tabBar">
	      <span>{{item.name}}</span>
	      <template #icon="props">
	        <span class="iconfont" :class="item.icon"></span>
	      </template>
	    </van-tabbar-item>

		
		
		
	</van-tabbar>
		
	</div>
</template>

<script>
	export default{
		name:"index",
		data(){
			return{
				active:0,
				tabBar:[{
					name:"首页",
					path:'/',
					icon:"icon-shouye"
				},{
					name:"发布",
					path:'/publish',
					icon:"icon-fabu"
				},{
					name:"我的",
					path:'/my',
					icon:"icon-wode"
				}]
			}
		}
	}
</script>

<style>
</style>
